package artibella.media
{
	import artibella.utils.StringsUtils;
	
	/**
	 * ...
	 * @author 
	 * 
	 */
	
	public class AListItem
	{
		
		protected var _indice:int = -1;
		
		protected var _url:String;
		protected var _label:String;
		protected var _preview:String;
		
		public function AListItem( u:String, label:String = "", preview:String = "" )  
		{
			_url = u;
			_label = label;
			_preview = preview;
		}

		// - - -
		
		public function set indice( i:int ):void
		{
			_indice = i;
			
			if ( _label == "" ) _label = StringsUtils.base10( _indice );
		}
		
		public function get indice():int
		{
			return _indice;
		}
		
		// - - -
		
		public function get url():String
		{
			return _url;
		}
		
		public function get label():String
		{
			return _label;
		}
		
		public function get preview():String
		{
			return _preview;
		}
		
		// - - -
		
		//protected function _strIndice():String
		//{
			//return ( _indice < 10 ) ? "0" + ( _indice + 1 ) : ( _indice + 1 ).toString();
		//}
		
	}

}